/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     struct TreeNode *left;
 *     struct TreeNode *right;
 * };
 */
//方法一
typedef struct TreeNode TreeNode;
struct TreeNode* mirrorTree(struct TreeNode* root) {
    if (root == NULL)
        return NULL;
    TreeNode* tmp = left;
    left = right;
    right = tmp;
    mirrorTree(root->left);
    mirrorTree(root->right);
    return RealRoot;
}
//方法二
typedef struct TreeNode TreeNode;
struct TreeNode* mirrorTree(struct TreeNode* root) {
    if (root == NULL)
    {
        return NULL;
    }
    else
    {
        TreeNode* right = root->right;
        root->right = mirrorTree(root->left);
        root->left = mirrorTree(right);
        return root;
    }

}

